package cn.zhentao.service;

import cn.zhentao.pojo.TPurchaseOrder;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
* @author 郭永辉
* @description 针对表【t_purchase_order(购车订单表（订单页、订单详情）)】的数据库操作Service
* @createDate 2025-09-03 14:23:10
*/
public interface TPurchaseOrderService extends IService<TPurchaseOrder> {

    Map<String, Object> createOrder(TPurchaseOrder order);

    List<TPurchaseOrder> getOrdersByStatusAndBuyer(byte[] statusList, Long buyerId);

    Map<String, Object> cancelOrder(Long orderId, String cancelReason);

    List<TPurchaseOrder> getOrdersByStatusAndUser(byte status, Long buyerId, Long sellerId);

    Map<String, Object> updateOrderAfterPayment(Long orderId, byte targetStatus, Date date);

    Map<String, Object> updateOrderStatus(Long orderId, byte status);
}
